<template>
	<view class="content">
		<u-navbar bgColor="transparent" titleStyle="color:#fff" title="卡券" leftIconColor="#fff" :autoBack="true"
			:placeholder="true">
		</u-navbar> 
		<view class="cert-box">
			<view class="img-cert" v-for="(item,index) in list" :key="index">
				<image :src="item.pic" @click="gotoitem()" mode="widthFix"></image>
				<view class="tisp">{{item.num}}张</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[],
			}
		},
		onLoad() {
			this.postquan()
		},
		methods:{
			gotoitem(){
				uni.switchTab({
					url:'/pages/shop/index'
				})
			},
			postquan(){
				let params = {
				
				}
				this.$Request({
					method: 'POST',
					url: '/api/shop/quan',
					data: params
				}).then(res => {
					if (res.code == 1) {
						this.list = res.data
						console.log(res)
					}
				})
			}
		}
	}
</script>
<style>
	page {
		background-color: #17191A;
	}
</style>
<style scoped lang="scss">
	.content {
		width: 100%;
		background-image: url('/static/my/my-bg.png');
		background-repeat: no-repeat;
		background-size: 100% 568rpx;
		.cert-box{
			padding: 30rpx;
			.img-cert{
				margin-bottom: 24rpx;
				position: relative;
				.tisp{
					width: 99rpx;
					height: 44rpx;
					background: #7FFFA5;
					border-radius: 24rpx 0rpx;
					position: absolute;
					left: 0;
					top: 0;
					text-align: center;
					line-height: 44rpx;
					font-size: 24rpx;
				}
				image{
					width: 100%;
					height: 250rpx;
				}
			}
		}
	}
</style>